import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//@ts-ignore忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import gloablComponent from './components/index'
//svg插件需要配置代码
import 'virtual:svg-icons-register'
//引入自定义插件对象:注册整个项目全局组件
import gloalComponent from '@/components'
//引入模板全局样式
import '@/styles/index.scss'
//引用路由
import router from './router'
//引入仓库
import pinia from './store'
//引入路由鉴权文件
import './permission'

const app = createApp(App)

//安装自定义插件
app.use(gloalComponent)

app.use(ElementPlus, {
  locale: zhCn,
})
//注册全局组件
app.use(gloablComponent)
//注册路由
app.use(router)
//注册pinia
app.use(pinia)
app.mount('#app')
